package com.distributeredis.redis_springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableAspectJAutoProxy
@EnableCaching
@EnableScheduling  // 开启定时任务
public class RedisSpringbootApplication {

    public static void main(String[] args) {
        SpringApplication.run(RedisSpringbootApplication.class, args);
    }

    //主要用来发送基于HTTP协议的RestFul风格的请求  此处可以配置resttemplate的超时时间配置
    @Bean
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }

}
